#include<iostream>
#include<string>
#include "stdlib.h"
using namespace std;

class A
{
public:
	friend class B;
	A(int _age, string _name) :age(_age), name(_name) {}
	~A() {};
	void print_a()
	{
		cout << name << "	" << age << endl;
	}
private:
	int age;
	string name;
};
class B
{
public:
	B() {};
	~B() {};
	void print_b(A& a)
	{
		a.print_a();
	}
};

int main()
{
	A a(20,"name");
	B b;
	b.print_b(a);
//	system("pause");
	return 0;
}

